/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.net.greenet.user.operation;

import cn.net.greenet.common.db_service.BaseDao;

/**
 * 记录用户登录操作Action
 *
 * @author liangdelin
 */
public class UserLoginAction {

    public static void insertDB(String username,String login_ip) {
        try {
            BaseDao baseDao = new BaseDao();
            int row = baseDao.executeUpdate("INSERT INTO useroperation(username,operation_time,`describe`) VALUES(?,?,?)", new Object[]{username, System.currentTimeMillis(), "用户" + username + "登录系统,登录IP地址为："+login_ip});
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
